From f2eae30c62a347dade351c9d39a34258b9fd094d Mon Sep 17 00:00:00 2001 From: Justin Burkett Date: Thu, 8 Feb 2024 21:36:45 -0500 Subject: [PATCH] Format first sentences of docstrings. Ensure a complete sentence (at least a phrase with a period at the end) that fits on one line. --- which-key.el | 279 +++++++++++++++++++++++++-------------------------- 1 file changed, 136 insertions(+), 143 deletions(-) diff --git a/which-key.el b/which-key.el index 4a19d1622f6..cf0c723f4fe 100644 --- a/which-key.el +++ b/which-key.el @@ -66,11 +66,10 @@ recommended :type 'float) (defcustom which-key-idle-secondary-delay nil - "Once the which-key buffer shows once for a key sequence reduce -the idle time to this amount (in seconds). This makes it possible -to shorten the delay for subsequent popups in the same key -sequence. The default is for this value to be nil, which disables -this behavior." + "Seconds to wait for which-key to pop up after initial display. +This makes it possible to shorten the delay for subsequent popups +in the same key sequence. The default is for this value to be +nil, which disables this behavior." :group 'which-key :type '(choice float (const :tag "Disabled" nil))) @@ -106,8 +105,7 @@ before. Truncation is done using `which-key-ellipsis'." :type 'integer) (defcustom which-key-add-column-padding 0 - "Additional padding (number of spaces) to add to the left of -each key column." + "Additional spaces to add to the left of each key column." :group 'which-key :type 'integer) @@ -134,9 +132,9 @@ of the which-key popup." (defcustom which-key-separator (if which-key-dont-use-unicode " : " " → ") - "Separator to use between key and description. Default is \" → -\", unless `which-key-dont-use-unicode' is non nil, in which case -the default is \" : \"." + "Separator to use between key and description. +Default is \" → \", unless `which-key-dont-use-unicode' is non +nil, in which case the default is \" : \"." :group 'which-key :type 'string) @@ -150,14 +148,15 @@ string to truncate without using any ellipsis." :type 'string) (defcustom which-key-prefix-prefix "+" - "String to insert in front of prefix commands (i.e., commands -that represent a sub-map). Default is \"+\"." + "Prefix string to indicate a key bound to a keymap. +Default is \"+\"." :group 'which-key :type 'string) (defcustom which-key-compute-remaps nil - "If non-nil, show remapped command if a command has been -remapped given the currently active keymaps." + "If non-nil, show remapped commands. +This applies to commands that have been remapped given the +currently active keymaps." :group 'which-key :type 'boolean) @@ -168,9 +167,8 @@ remapped given the currently active keymaps." '((("") . ("←")) (("") . ("→")))) (("<\\([[:alnum:]-]+\\)>") . ("\\1")))) - "Association list to determine how to manipulate descriptions -of key bindings in the which-key popup. Each element of the list -is a nested cons cell with the format + "ALIST for manipulating display of binding descriptions. +Each element of the list is a nested cons cell with the format \(MATCH CONS . REPLACEMENT\). @@ -207,20 +205,21 @@ non-nil value." (choice string (const nil))))) (defcustom which-key-allow-multiple-replacements nil - "Allow a key binding to match and be modified by multiple -elements in `which-key-replacement-alist' if non-nil. When nil, -only the first match is used to perform replacements from + "Allow a key binding to be modified by multiple elements. +When non-nil, this allows a single key binding to match multiple +patterns in `which-key-replacement-alist'. When nil, only the +first match is used to perform replacements from `which-key-replacement-alist'." :group 'which-key :type 'boolean) (defcustom which-key-show-docstrings nil - "If non-nil, show each command's docstring next to the command -in the which-key buffer. This will only display the docstring up -to the first line break. If you set this variable to the symbol -docstring-only, then the command's name with be omitted. You -probably also want to adjust `which-key-max-description-length' -at the same time if you use this feature." + "If non-nil, show each command's docstring in the which-key popup. +This will only display the docstring up to the first line +break. If you set this variable to the symbol docstring-only, +then the command's name with be omitted. You probably also want +to adjust `which-key-max-description-length' at the same time if +you use this feature." :group 'which-key :type '(radio (const :tag "Do not show docstrings" nil) @@ -228,9 +227,9 @@ at the same time if you use this feature." (const :tag "Replace command name with docstring" docstring-only))) (defcustom which-key-highlighted-command-list '() - "A list of strings and/or cons cells used to highlight certain -commands. If the element is a string, assume it is a regexp -pattern for matching command names and use + "Rules used to highlight certain commands. +If the element is a string, assume it is a regexp pattern for +matching command names and use `which-key-highlighted-command-face' for any matching names. If the element is a cons cell, it should take the form (regexp . face to apply)." @@ -238,9 +237,9 @@ face to apply)." :type '(repeat (choice string (cons regexp face)))) (defcustom which-key-special-keys '() - "These keys will automatically be truncated to one character -and have `which-key-special-key-face' applied to them. This is -disabled by default. Try this to see the effect. + "These keys will automatically be truncated to one character. +They also have `which-key-special-key-face' applied to them. This +is disabled by default. An example configuration is \(setq which-key-special-keys \\='(\"SPC\" \"TAB\" \"RET\" \"ESC\" \"DEL\")\)" :group 'which-key @@ -252,7 +251,7 @@ disabled by default. Try this to see the effect. :type 'string) (defcustom which-key-show-prefix 'echo - "Whether to and where to display the current prefix sequence + "Whether to and where to display the current prefix sequence. Possible choices are echo for echo area (the default), left, top and nil. Nil turns the feature off." :group 'which-key @@ -277,8 +276,8 @@ and nil. Nil turns the feature off." :type 'integer) (defcustom which-key-max-display-columns nil - "Maximum number of columns to display in the which-key buffer -nil means don't impose a maximum." + "Maximum number of columns to display in the which-key buffer. +A value of nil means don't impose a maximum." :group 'which-key :type '(choice integer (const :tag "Unbounded" nil))) @@ -297,9 +296,9 @@ location is tried." (const (bottom right)))) (defcustom which-key-side-window-slot 0 - "The `slot' to use for `display-buffer-in-side-window' when -`which-key-popup-type' is `side-window'. Quoting from the -docstring of `display-buffer-in-side-window', + "The `slot' to use for `display-buffer-in-side-window'. +This applies when `which-key-popup-type' is `side-window'. +Quoting from the docstring of `display-buffer-in-side-window', `slot' if non-nil, specifies the window slot where to display BUFFER. A value of zero or nil means use the middle slot on the @@ -311,14 +310,14 @@ the right of) the middle slot. The default is zero." :type 'integer) (defcustom which-key-side-window-max-width 0.333 - "Maximum width of which-key popup when type is side-window + "Maximum width of which-key popup when type is side-window. This variable can also be a number between 0 and 1. In that case, it denotes a percentage out of the frame's width." :group 'which-key :type 'float) (defcustom which-key-side-window-max-height 0.25 - "Maximum height of which-key popup when type is side-window + "Maximum height of which-key popup when type is side-window. This variable can also be a number between 0 and 1. In that case, it denotes a percentage out of the frame's height." :group 'which-key @@ -335,9 +334,9 @@ a percentage out of the frame's height." :type 'integer) (defcustom which-key-allow-imprecise-window-fit (not (display-graphic-p)) - "If non-nil allow which-key to use a less intensive method of -fitting the popup window to the buffer. If you are noticing lag -when the which-key popup displays turning this on may help. + "Allow which-key to use a simpler method for resizing the popup. +If you are noticing lag when the which-key popup displays turning +this on may help. See https://github.com/justbur/emacs-which-key/issues/130 and https://github.com/justbur/emacs-which-key/issues/225." @@ -351,8 +350,9 @@ and https://github.com/justbur/emacs-which-key/issues/225." (const :tag "No" nil))) (defcustom which-key-sort-order 'which-key-key-order - "If nil, do not resort the output from -`describe-buffer-bindings' which groups by mode. Ordering options + "Order in which the key bindings are sorted. +If nil, do not resort the output from `describe-buffer-bindings' +which groups by mode. Ordering options are 1. `which-key-key-order': by key (default) @@ -371,9 +371,9 @@ information." (function-item which-key-local-then-key-order))) (defcustom which-key-sort-uppercase-first t - "If non-nil, uppercase comes before lowercase in sorting -function chosen in `which-key-sort-order'. Otherwise, the order -is reversed." + "If non-nil, uppercase comes before lowercase in sorting. +This applies to the function chosen in +`which-key-sort-order'. Otherwise, the order is reversed." :group 'which-key :type 'boolean) @@ -383,8 +383,8 @@ is reversed." :type '(repeat string)) (defcustom which-key-paging-key "" - "Key to use for changing pages. Bound after each of the -prefixes in `which-key-paging-prefixes'" + "Key to use for changing pages. +Bound after each of the prefixes in `which-key-paging-prefixes'" :group 'which-key :type 'string) @@ -400,18 +400,18 @@ prefixes in `which-key-paging-prefixes'" ;; :type '(repeat symbol)) (defcustom which-key-use-C-h-commands t - "Use C-h (or whatever `help-char' is set to) for paging if -non-nil. Normally C-h after a prefix calls + "Use C-h (`help-char') for paging if non-nil. +Normally `help-char' after a prefix calls `describe-prefix-bindings'. This changes that command to a which-key paging command when which-key-mode is active." :group 'which-key :type 'boolean) (defcustom which-key-show-early-on-C-h nil - "Show the which-key buffer before if C-h (or whatever -`help-char' is set to) is pressed in the middle of a prefix -before the which-key buffer would normally be triggered through -the idle delay. If combined with the following settings, + "Allow C-h (`help-char') to trigger which-key popup before timer. +Show the which-key buffer if `help-char' is pressed in the middle +of a prefix before the which-key buffer would normally be +triggered by the time. If combined with the following settings, which-key will effectively only show when triggered \"manually\" using C-h. @@ -429,10 +429,12 @@ Note that `which-key-idle-delay' should be set before turning on :type 'boolean) (defcustom which-key-preserve-window-configuration nil - "If non-nil, save window configuration before which-key buffer is shown -and restore it after which-key buffer is hidden. It prevents which-key from -changing window position of visible buffers. -Only takken into account when popup type is side-window." + "Save and restore window configuration around which-key popup display. +If non-nil, save window configuration before which-key buffer is +shown and restore it after which-key buffer is hidden. It +prevents which-key from changing window position of visible +buffers. Only takken into account when popup type is +side-window." :group 'which-key :type 'boolean) @@ -453,8 +455,8 @@ Only takken into account when popup type is side-window." which-key-separator "abort" " 1..9" which-key-separator "digit-arg") - "Prompt to display when invoking `which-key-C-h-map'. This string -is fed into `substitute-command-keys'") + "Prompt to display when invoking `which-key-C-h-map'. +This string is fed into `substitute-command-keys'") (defvar which-key-C-h-map (let ((map (make-sparse-keymap))) @@ -506,7 +508,8 @@ See http://www.gnu.org/software/emacs/manual/html_node/emacs/Modifier-Keys.html" :type 'boolean) (defcustom which-key-delay-functions nil - "A list of functions that may decide whether to delay the + "List of functions that may delay the which-key popup. +A list of functions that may decide whether to delay the which-key popup based on the current incomplete key sequence. Each function in the list is run with two arguments, the current key sequence as produced by `key-description' and the @@ -529,11 +532,10 @@ key sequences is what is produced by `key-description'." :type '(repeat regexp)) (defcustom which-key-inhibit-regexps nil - "Similar to `which-key-allow-regexps', a list of regexp strings -to use to filter key sequences. When non-nil, for a key sequence -to trigger the which-key popup it cannot match one of the regexps -in this list. The format of the key sequences is what is produced -by `key-description'." + "A list of regexp strings to use to filter key sequences. +When non-nil, for a key sequence to trigger the which-key popup +it cannot match one of the regexps in this list. The format of +the key sequences is what is produced by `key-description'." :group 'which-key :type '(repeat regexp)) @@ -613,7 +615,7 @@ and it matches a string in `which-key-highlighted-command-list'." ;;;; Custom popup (defcustom which-key-custom-popup-max-dimensions-function nil - "Variable to hold a custom max-dimensions function. + "Set a custom max-dimensions function. Will be passed the width of the active window and is expected to return the maximum height in lines and width in characters of the which-key popup in the form a cons cell (height . width)." @@ -621,13 +623,13 @@ which-key popup in the form a cons cell (height . width)." :type '(choice function (const nil))) (defcustom which-key-custom-hide-popup-function nil - "Variable to hold a custom hide-popup function. + "Set a custom hide-popup function. It takes no arguments and the return value is ignored." :group 'which-key :type '(choice function (const nil))) (defcustom which-key-custom-show-popup-function nil - "Variable to hold a custom show-popup function. + "Set a custom show-popup function. Will be passed the required dimensions in the form (height . width) in lines and characters respectively. The return value is ignored." @@ -640,15 +642,16 @@ ignored." :type 'string) (defvar which-key-inhibit nil - "Prevent which-key from popping up momentarily by setting this -to a non-nil value for the execution of a command. Like this + "Prevent which-key from popping up momentarily. +This can be used by setting this to a non-nil value for the +execution of a command, as in \(let \(\(which-key-inhibit t\)\) ...\)") (defvar which-key-keymap-history nil - "History of keymap selections in functions like -`which-key-show-keymap'.") + "History of keymap selections. +Used in functions like `which-key-show-keymap'.") ;;; Internal Vars @@ -775,22 +778,21 @@ operators." :type 'boolean) (defcustom which-key-show-operator-state-maps nil - "Experimental: Try to show the right keys following an evil -command that reads a motion, such as \"y\", \"d\" and \"c\" from -normal state. This is experimental, because there might be some -valid keys missing and it might be showing some invalid keys." + "Show the keys following an evil command that reads a motion. +These are commands typically mapped to keys such as \"y\", \"d\" +and \"c\" from normal state. This is experimental, because there +might be some valid keys missing and it might be showing some +invalid keys." :group 'which-key :type 'boolean) ;;;; God-mode (defvar which-key--god-mode-support-enabled nil - "Support god-mode if non-nil. This is experimental, -so you need to explicitly opt-in for now. Please report any -problems at github.") + "Support god-mode if non-nil.") (defvar which-key--god-mode-key-string nil - "Holds key string to use for god-mode support.") + "String to use for god-mode support.") (defun which-key--god-mode-lookup-command-advice (orig-fun arg1 &rest args) (setq which-key--god-mode-key-string arg1) @@ -873,8 +875,8 @@ disable support." (run-hooks 'which-key-init-buffer-hook)))) (defun which-key--setup-echo-keystrokes () - "Reduce `echo-keystrokes' if necessary (it will interfere if -it's set too high)." + "Reduce `echo-keystrokes' if necessary. +It will interfere if set too high." (when (and echo-keystrokes (> (abs (- echo-keystrokes which-key-echo-keystrokes)) 0.000001)) (if (> which-key-idle-delay which-key-echo-keystrokes) @@ -883,7 +885,8 @@ it's set too high)." echo-keystrokes which-key-echo-keystrokes)))) (defun which-key-remove-default-unicode-chars () - "Use of `which-key-dont-use-unicode' is preferred to this + "Remove default unicode chars from settings. +Use of `which-key-dont-use-unicode' is preferred to this function, but it's included here in case someone cannot set that variable early enough in their configuration, if they are using a starter kit for example." @@ -894,7 +897,7 @@ starter kit for example." ;;;###autoload (defun which-key-setup-side-window-right () - "Apply suggested settings for side-window that opens on right." + "Set up side-window on right." (interactive) (setq which-key-popup-type 'side-window which-key-side-window-location 'right @@ -902,8 +905,8 @@ starter kit for example." ;;;###autoload (defun which-key-setup-side-window-right-bottom () - "Apply suggested settings for side-window that opens on right -if there is space and the bottom otherwise." + "Set up side-window on right if space allows. +Otherwise, use bottom." (interactive) (setq which-key-popup-type 'side-window which-key-side-window-location '(right bottom) @@ -911,7 +914,7 @@ if there is space and the bottom otherwise." ;;;###autoload (defun which-key-setup-side-window-bottom () - "Apply suggested settings for side-window that opens on bottom." + "Set up side-window that opens on bottom." (interactive) (which-key--setup-echo-keystrokes) (setq which-key-popup-type 'side-window @@ -920,7 +923,7 @@ if there is space and the bottom otherwise." ;;;###autoload (defun which-key-setup-minibuffer () - "Apply suggested settings for minibuffer. + "Set up minibuffer display. Do not use this setup if you use the paging commands. Instead use `which-key-setup-side-window-bottom', which is nearly identical but more functional." @@ -1049,7 +1052,7 @@ If AT-ROOT is non-nil the binding is also placed at the root of MAP." ;;; Functions for computing window sizes (defun which-key--text-width-to-total (text-width) - "Convert window text-width to window total-width. + "Convert window TEXT-WIDTH to window total-width. TEXT-WIDTH is the desired text width of the window. The function calculates what total width is required for a window in the selected to have a text-width of TEXT-WIDTH columns. The @@ -1065,7 +1068,7 @@ width as the frame." 3))) (defun which-key--total-width-to-text (total-width) - "Convert window total-width to window text-width. + "Convert window TOTAL-WIDTH to window text-width. TOTAL-WIDTH is the desired total width of the window. The function calculates what text width fits such a window. The calculation considers possible fringes and scroll bars. This function assumes that the desired window has the same @@ -1135,8 +1138,7 @@ total height." (which-key--hide-popup-ignore-command))) (defun which-key--hide-popup-ignore-command () - "Version of `which-key--hide-popup' without the check of -`real-this-command'." + "`which-key--hide-popup' without the check of `real-this-command'." (cl-case which-key-popup-type ;; Not necessary to hide minibuffer ;; (minibuffer (which-key--hide-buffer-minibuffer)) @@ -1288,7 +1290,8 @@ call signature in different emacs versions" ;;; Max dimension of available window functions (defun which-key--popup-max-dimensions () - "Dimesion functions should return the maximum possible (height + "Return maximum dimension available for popup. +Dimesion functions should return the maximum possible (height . width) of the intended popup. SELECTED-WINDOW-WIDTH is the width of currently active window, not the which-key buffer window." @@ -1312,8 +1315,9 @@ Measured in lines and characters respectively." (max 0 (- (frame-text-cols) which-key-unicode-correction)))) (defun which-key--side-window-max-dimensions () - "Return max-dimensions of the side-window popup (height . -width) in lines and characters respectively." + "Return max-dimensions of the side-window popup. +The return value should be (height . width) in lines and +characters respectively." (cons ;; height (if (member which-key-side-window-location '(left right)) @@ -1336,8 +1340,9 @@ width) in lines and characters respectively." which-key-unicode-correction)))) (defun which-key--frame-max-dimensions () - "Return max-dimensions of the frame popup (height . -width) in lines and characters respectively." + "Return max-dimensions of the frame popup. +The return value should be (height . width) in lines and +characters respectively." (cons which-key-frame-max-height which-key-frame-max-width)) ;;; Sorting functions @@ -1363,8 +1368,8 @@ width) in lines and characters respectively." (t (string-lessp a b))))) (defun which-key--key-description< (a b &optional alpha) - "Sorting function used for `which-key-key-order' and -`which-key-key-order-alpha'." + "Key sorting function. +Used for `which-key-key-order' and `which-key-key-order-alpha'." (save-match-data (let* ((a (which-key--extract-key a)) (b (which-key--extract-key b)) @@ -1435,9 +1440,8 @@ Uses `string-lessp' after applying lowercase." (keymapp (intern description)))) (defun which-key-prefix-then-key-order (acons bcons) - "Order first by whether A and/or B is a prefix with no prefix -coming before a prefix. Within these categories order using -`which-key-key-order'." + "Order prefixes before non-prefixes. +Within these categories order using `which-key-key-order'." (let ((apref? (which-key--group-p (cdr acons))) (bpref? (which-key--group-p (cdr bcons)))) (if (not (eq apref? bpref?)) @@ -1445,9 +1449,8 @@ coming before a prefix. Within these categories order using (which-key-key-order acons bcons)))) (defun which-key-prefix-then-key-order-reverse (acons bcons) - "Order first by whether A and/or B is a prefix with prefix -coming before a prefix. Within these categories order using -`which-key-key-order'." + "Order prefixes before non-prefixes. +Within these categories order using `which-key-key-order'." (let ((apref? (which-key--group-p (cdr acons))) (bpref? (which-key--group-p (cdr bcons)))) (if (not (eq apref? bpref?)) @@ -1455,9 +1458,8 @@ coming before a prefix. Within these categories order using (which-key-key-order acons bcons)))) (defun which-key-local-then-key-order (acons bcons) - "Order first by whether A and/or B is a local binding with -local bindings coming first. Within these categories order using -`which-key-key-order'." + "Order local bindings before non-local ones. +Within these categories order using `which-key-key-order'." (let ((aloc? (which-key--local-binding-p acons)) (bloc? (which-key--local-binding-p bcons))) (if (not (eq aloc? bloc?)) @@ -1662,10 +1664,10 @@ cell" el))))) (defun which-key--propertize-description (description group local hl-face &optional original-description) - "Add face to DESCRIPTION where the face chosen depends on -whether the description represents a group or a command. Also -make some minor adjustments to the description string, like -removing a \"group:\" prefix. + "Add face to DESCRIPTION. +The face chosen depends on whether the description represents a +group or a command. Also make some minor adjustments to the +description string, like removing a \"group:\" prefix. ORIGINAL-DESCRIPTION is the description given by `describe-buffer-bindings'." @@ -1736,7 +1738,8 @@ return the docstring." (format "%s %s" current docstring))))) (defun which-key--format-and-replace (unformatted &optional preserve-full-key) - "Take a list of (key . desc) cons cells in UNFORMATTED, add + "Make list of key bindings with separators and descriptions. +Take a list of (key . desc) cons cells in UNFORMATTED, add faces and perform replacements according to the three replacement alists. Returns a list (key separator description)." (let ((sep-w-face @@ -1774,8 +1777,7 @@ alists. Returns a list (key separator description)." (defun which-key--compute-binding (binding) "Replace BINDING with remapped binding if it exists. - -Requires `which-key-compute-remaps' to be non-nil" +Requires `which-key-compute-remaps' to be non-nil." (let (remap) (if (and which-key-compute-remaps (setq remap (command-remapping binding))) @@ -1909,14 +1911,14 @@ non-nil, then bindings are collected recursively for all prefixes." (mapconcat (lambda (row) (mapconcat #'identity row " ")) rows "\n"))) (defsubst which-key--max-len (keys index &optional initial-value) - "Internal function for finding the max length of the INDEX -element in each list element of KEYS." + "Find the max length of the INDEX element in each of KEYS." (cl-reduce (lambda (x y) (max x (which-key--string-width (nth index y)))) keys :initial-value (if initial-value initial-value 0))) (defun which-key--pad-column (col-keys avl-width) - "Take a column of (key separator description) COL-KEYS, + "Pad cells of COL-KEYS to AVL-WIDTH. +Take a column of (key separator description) COL-KEYS, calculate the max width in the column and pad all cells out to that width." (let* ((col-key-width (+ which-key-add-column-padding @@ -2111,8 +2113,8 @@ max-lines max-width avl-lines avl-width (which-key--pages-height result)) (_ (format " %s" prefix-arg)))))))) (defun which-key--full-prefix (prefix-keys &optional -prefix-arg dont-prop-keys) - "Return a description of the full key sequence up to now, -including prefix arguments." + "Return a description of the full key sequence up to now. +Include prefix arguments." (let* ((left (eq which-key-show-prefix 'left)) (prefix-arg (if -prefix-arg -prefix-arg prefix-arg)) (str (concat @@ -2137,9 +2139,9 @@ including prefix arguments." map))) (defun which-key--process-page (pages-obj) - "Add information to the basic list of key bindings, including -if applicable the current prefix, the name of the current prefix, -and a page count." + "Add information to the basic list of key bindings. +Include, if applicable, the current prefix, the name of the current +prefix, and a page count." (let* ((page (car (which-key--pages-pages pages-obj))) (height (which-key--pages-height pages-obj)) (n-pages (which-key--pages-num-pages pages-obj)) @@ -2285,8 +2287,7 @@ Usually this is `describe-prefix-bindings'." ;;;###autoload (defun which-key-show-next-page-no-cycle () - "Show next page of keys unless on the last page, in which case -call `which-key-show-standard-help'." + "Show next page of keys or `which-key-show-standard-help'." (interactive) (let ((which-key-inhibit t)) (if (which-key--on-last-page) @@ -2295,8 +2296,7 @@ call `which-key-show-standard-help'." ;;;###autoload (defun which-key-show-previous-page-no-cycle () - "Show previous page of keys unless on the first page, in which -case do nothing." + "Show previous page of keys if one exists." (interactive) (let ((which-key-inhibit t)) (unless (which-key--on-first-page) @@ -2304,16 +2304,14 @@ case do nothing." ;;;###autoload (defun which-key-show-next-page-cycle (&optional _) - "Show the next page of keys, cycling from end to beginning -after last page." + "Show the next page of keys, cycling from end to beginning." (interactive) (let ((which-key-inhibit t)) (which-key-turn-page 1))) ;;;###autoload (defun which-key-show-previous-page-cycle (&optional _) - "Show the previous page of keys, cycling from beginning to end -after first page." + "Show the previous page of keys, cycling from beginning to end." (interactive) (let ((which-key-inhibit t)) (which-key-turn-page -1))) @@ -2327,7 +2325,6 @@ after first page." ;;;###autoload (defun which-key-show-major-mode (&optional all) "Show top-level bindings in the map of the current major mode. - This function will also detect evil bindings made using `evil-define-key' in this map. These bindings will depend on the current evil state. " @@ -2344,7 +2341,6 @@ current evil state. " ;;;###autoload (defun which-key-show-full-major-mode () "Show all bindings in the map of the current major mode. - This function will also detect evil bindings made using `evil-define-key' in this map. These bindings will depend on the current evil state. " @@ -2354,7 +2350,6 @@ current evil state. " ;;;###autoload (defun which-key-dump-bindings (prefix buffer-name) "Dump bindings from PREFIX into buffer named BUFFER-NAME. - PREFIX should be a string suitable for `kbd'." (interactive "sPrefix: \nB") (let* ((buffer (get-buffer-create buffer-name)) @@ -2409,9 +2404,9 @@ PREFIX should be a string suitable for `kbd'." ;;;###autoload (defun which-key-C-h-dispatch () - "Dispatch C-h commands by looking up key in -`which-key-C-h-map'. This command is always accessible (from any -prefix) if `which-key-use-C-h-commands' is non nil." + "Dispatch C-h commands by looking up key in `which-key-C-h-map'. +This command is always accessible (from any prefix) if +`which-key-use-C-h-commands' is non nil." (interactive) (cond ((and (not (which-key--popup-showing-p)) which-key-show-early-on-C-h) @@ -2460,7 +2455,6 @@ prefix) if `which-key-use-C-h-commands' is non nil." (defun which-key--try-2-side-windows (bindings prefix-keys prefix-title loc1 loc2 &rest _ignore) "Try to show BINDINGS (PAGE-N) in LOC1 first. - Only if no bindings fit fallback to LOC2." (let (pages1) (let ((which-key-side-window-location loc1) @@ -2655,8 +2649,7 @@ Finally, show the buffer." this-command-keys)) (defun which-key--update () - "Function run by timer to possibly trigger -`which-key--create-buffer-and-show'." + "Function run by timer to possibly trigger `which-key--create-buffer-and-show'." (let ((prefix-keys (which-key--this-command-keys)) delay-time) (cond ((and (> (length prefix-keys) 0) -- 2.30.2